<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
<style type="text/css">
	.box1{width:500px;height: 60px;}
	.aa{text-align: right;width: 100px;float: left;}
	.bb{text-align: left;width: 300px;}
</style>
<script type="text/javascript">
	function Check() {
		var name = document.getElementById("loginID").value;
		var pwd = document.getElementById("loginPwd").value;

		if (name.length <=0 || pwd.length <=0) {
			alert("账号和密码不能为空");
			return false
		}
	
		return true
	}
</script>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
String strmsg=request.getParameter("erroy");
if(strmsg!="" && strmsg!=null){
	if(strmsg.equals("0")){
		out.print("<script type='text/javascript'>alert('验证码不正确！');</script>");
	}
	if(strmsg.equals("1")){
		out.print("<script type='text/javascript'>alert('用户名或密码错误！');</script>");
	}
}	
%>
<form id="from1" method="post" action="IsPassVali.jsp" onsubmit="return Check()">

<div style="position:fixed;left:35%;top:20%;">
	<div class="box1">
		<div class="aa">登录账号：</div>
		<div class="bb"><input type="text" id="loginID" name="loginID" style="height: 25px"></div>
	</div>
	<div class="box1">
		<div class="aa">密码：</div>
		<div class="bb"><input type="password" id="loginPwd" name="loginPwd" style="height: 25px"></div>
	</div>
	<div class="box1">
		<div class="aa">验证码：</div>
		<div class="bb"><img src="ValidateImg.jsp"/> </div>
	</div>
	<div class="box1">
		
		<div class="bb" style="margin-left: 100px;"><input type="text" id="code" name="code" style="height: 25px"></div>
	</div>
	<div class="box1">
		
		<div class="bb" style="margin-left: 100px;"><input type="submit" id="btnOK" name="btnOK" style="height: 30px;width: 100px;"></div>
	</div>
</div>
</form>
</body>
</html>